﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Caching;
using Telerik.Web.UI;
using System.Net;
using System.Collections.Specialized;
using System.Configuration;

public partial class Modules_FileManager_InsertFTPDocument : System.Web.UI.Page
{
    public string pathreplace { get; set; }
    //protected void Page_Load(object sender, EventArgs e)
    //{
    //    pathreplace = ConfigurationManager.AppSettings["FtpImage"].ToString();
    //    string[] paths = new string[] { ConfigurationManager.AppSettings["FtpDocument"].ToString() };
    //    RadFileExplorer1.Configuration.ViewPaths = paths;

    //    string[] deletePaths = new string[] { ConfigurationManager.AppSettings["FtpDocument"].ToString() };
    //    RadFileExplorer1.Configuration.DeletePaths = deletePaths;

    //    string[] uploadPaths = new string[] { ConfigurationManager.AppSettings["FtpDocument"].ToString() };
    //    RadFileExplorer1.Configuration.UploadPaths = uploadPaths;

    //    // The "ROOT/CanDelAndUpload/" folder is configured with full permissions
    //    RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(FtpContentProvider).AssemblyQualifiedName;
    //}
    protected void Page_Load(object sender, EventArgs e)
    {
        pathreplace = ConfigurationManager.AppSettings["FtpImage"].ToString();
        //string[] paths = new string[] { ConfigurationManager.AppSettings["FtpDocument"].ToString() };
        string[] paths = new string[] { "~/static/" };
        RadFileExplorer1.Configuration.ViewPaths = paths;

        string[] deletePaths = new string[] { ConfigurationManager.AppSettings["FtpDocument"].ToString() };
        RadFileExplorer1.Configuration.DeletePaths = paths;

        string[] uploadPaths = new string[] { ConfigurationManager.AppSettings["FtpDocument"].ToString() };
        RadFileExplorer1.Configuration.UploadPaths = paths;

        // The "ROOT/CanDelAndUpload/" folder is configured with full permissions
        //RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(FtpContentProvider).AssemblyQualifiedName;
        RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(Telerik.Web.UI.Widgets.FileSystemContentProvider).AssemblyQualifiedName;
    }
}